<?php
class CreateProperties extends CakeMigration {

/**
 * Migration description
 *
 * @var string
 * @access public
 */
	public $description = '';

/**
 * Actions to be performed
 *
 * @var array $migration
 * @access public
 */
	public $migration = array(
		'up' => array(
			'create_table' => array(
					'properties' => array(
						  'id' => array('type' =>'integer', 'null' => false, 'key' => 'primary'),
						  'name' => array('type' =>'string', 'null' => false),
							'simple_contrain' => array('type' => 'string'),
							'examples' => array('type' => 'string'),
							'type' => array('type' => 'integer', 'default' => 0, 'null' => false),
							'status' => array('type' => 'integer', 'default' => 0, 'null' => false),
							'created_at' => array('type' => 'timestamp'),
							'updated_at' => array('type' => 'timestamp'),
						  'indexes' => array('PRIMARY' => array('column' => 'id','unique' => 1))
					)
			)
		),
		'down' => array(
			'drop_table' => array('properties')
		),
	);

/**
 * Before migration callback
 *
 * @param string $direction, up or down direction of migration process
 * @return boolean Should process continue
 * @access public
 */
	public function before($direction) {
		return true;
	}

/**
 * After migration callback
 *
 * @param string $direction, up or down direction of migration process
 * @return boolean Should process continue
 * @access public
 */
	public function after($direction) {
		return true;
	}
}
